<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <title>
Bugzilla::Install::Localconfig</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <link rel="stylesheet" title="style" type="text/css" href="../.././../../../style.css" media="all" >

</head>
  <body id="pod">
<p class="backlinktop"><b><a name="___top" href="../../index.html" accesskey="1" title="All Documents">&lt;&lt;</a></b></p>
<h1></h1>
<div class='indexgroup'>
<ul   class='indexList indexList1'>
  <li class='indexItem indexItem1'><a href='#NAME'>NAME</a>
  <li class='indexItem indexItem1'><a href='#SYNOPSIS'>SYNOPSIS</a>
  <li class='indexItem indexItem1'><a href='#DESCRIPTION'>DESCRIPTION</a>
  <li class='indexItem indexItem1'><a href='#CONSTANTS'>CONSTANTS</a>
  <li class='indexItem indexItem1'><a href='#SUBROUTINES'>SUBROUTINES</a>
</ul>
</div>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="NAME"
>NAME</a></h1>

<p>Bugzilla::Install::Localconfig - Functions and variables dealing with the manipulation and creation of the <em  class="code">localconfig</em> file.</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="SYNOPSIS"
>SYNOPSIS</a></h1>

<pre  class="code"> use Bugzilla::Install::Requirements qw(update_localconfig);
 update_localconfig({ output =&#62; 1 });</pre>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="DESCRIPTION"
>DESCRIPTION</a></h1>

<p>This module is used primarily by <a href="../../checksetup.pl.html" class="podlinkpod"
>checksetup.pl</a> to create and modify the localconfig file. Most scripts should use <a href="../../Bugzilla.html#localconfig" class="podlinkpod"
>&#34;localconfig&#34; in Bugzilla</a> to access localconfig variables.</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="CONSTANTS"
>CONSTANTS</a></h1>

<dl>
<dt><a name="LOCALCONFIG_VARS"
><code  class="code">LOCALCONFIG_VARS</code></a></dt>

<dd>
<p>An array of hashrefs. These hashrefs contain three keys:</p>

<pre  class="code"> name    - The name of the variable.
 default - The default value for the variable. Should always be
           something that can fit in a scalar.
 desc    - Additional text to put in localconfig before the variable
           definition. Must end in a newline. Each line should start
           with &#34;#&#34; unless you have some REALLY good reason not
           to do that.</pre>

<dt><a name="OLD_LOCALCONFIG_VARS"
><code  class="code">OLD_LOCALCONFIG_VARS</code></a></dt>

<dd>
<p>An array of names of variables. If <code  class="code">update_localconfig</code> finds these variables defined in localconfig, it will print out a warning.</p>
</dd>
</dl>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="SUBROUTINES"
>SUBROUTINES</a></h1>

<dl>
<dt><a name="read_localconfig"
><code  class="code">read_localconfig</code></a></dt>

<dd>
<dl>
<dt><a name="Description"
><b>Description</b></a></dt>

<dd>
<p>Reads the localconfig file and returns all valid values in a hashref.</p>

<dt><a name="Params"
><b>Params</b></a></dt>

<dd>
<dl>
<dt><a name="$include_deprecated"
><code  class="code">$include_deprecated</code></a></dt>

<dd>
<p><code  class="code">true</code> if you want the returned hashref to include *any* variable currently defined in localconfig, even if it doesn&#39;t exist in <code  class="code">LOCALCONFIG_VARS</code>. Generally this is is only for use by <a href="#update_localconfig" class="podlinkpod"
>&#34;update_localconfig&#34;</a>.</p>
</dd>
</dl>

<dt><a name="Returns"
><b>Returns</b></a></dt>

<dd>
<p>A hashref of the localconfig variables. If an array is defined in localconfig, it will be an arrayref in the returned hash. If a hash is defined, it will be a hashref in the returned hash. Only includes variables specified in <code  class="code">LOCALCONFIG_VARS</code>, unless <code  class="code">$include_deprecated</code> is true.</p>
</dd>
</dl>

<dt><a name="update_localconfig"
><code  class="code">update_localconfig</code></a></dt>

<dd>
<p>Description: Adds any new variables to localconfig that aren&#39;t currently defined there. Also optionally prints out a message about vars that *should* be there and aren&#39;t. Exits the program if it adds any new vars.</p>

<p>Params: <code  class="code">$output</code> - <code  class="code">true</code> if the function should display informational output and warnings. It will always display errors or any message which would cause program execution to halt.</p>

<p>Returns: A hashref, with <code  class="code">old_vals</code> being an array of names of variables that were removed, and <code  class="code">new_vals</code> being an array of names of variables that were added to localconfig.</p>
</dd>
</dl>
<p class="backlinkbottom"><b><a name="___bottom" href="../../index.html" title="All Documents">&lt;&lt;</a></b></p>

<!-- end doc -->

</body></html>
